<?php

namespace App\Http\Controllers\Supplier;
use App\Http\Controllers\Controller;
use App\Models\Areas;
use App\Models\Category;
use App\Services\CommonService;
use App\Services\OrderService;

//通用方法
class CurrencyController extends Controller
{
    //获取一级分类(公用)
    public function getParentCategory()
    {
        $data = Category::GetParentCate();
        return ReturnMsg(CommonService::HTTP_CODE_SUCCESS, '获取成功', $data);
    }

    //获取省市信息(公用)
    public function getAreas()
    {
        $data = Areas::GetAreasList();
        return ReturnMsg(CommonService::HTTP_CODE_SUCCESS, '获取成功', $data);
    }

    //获取省市区信息(公用)
    public function getRegion()
    {
        $data = Areas::handle(Areas::GetAllAreasList());
        return ReturnMsg(CommonService::HTTP_CODE_SUCCESS, '获取成功', $data);
    }

    //获取所有订单状态
    public function getOrderStatus(){
        return ReturnMsg(CommonService::HTTP_CODE_SUCCESS,'获取成功',OrderService::ORDER_STATUS_NAME_LIST);
    }


}
